﻿<%@ Page Language="C#" MasterPageFile="~/ffl/ffl.master" AutoEventWireup="true" CodeFile="results.aspx.cs" Inherits="ffl_anonymous_results" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <form runat="server">
        <asp:DropDownList runat="server" ID="CompetitionDropDown" AutoPostBack="true"
            onselectedindexchanged="CompetitionDropDown_SelectedIndexChanged"></asp:DropDownList>
        <asp:DropDownList runat="server" ID="MonthDropDown" AutoPostBack="true"
            onselectedindexchanged="MonthDropDown_DelectedIndexChanged"></asp:DropDownList>
        <asp:Repeater runat="server" ID="DateRepeater" 
            onitemdatabound="DateRepeater_ItemDataBound">
            <HeaderTemplate>
                <table width="100%" cellpadding="0" cellspacing="0">
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td class="tableheader" align="center" colspan="3">
                        <%#((DateTime)DataBinder.Eval(Container.DataItem, "MatchDate")).ToString("d MMMM yyyy") %>
                    </td>
                </tr>
                <asp:HiddenField runat="server" ID="MatchDateHidden" Value='<%#((DateTime)DataBinder.Eval(Container.DataItem, "MatchDate")).ToString("d MMMM yyyy") %>' />
                <asp:Repeater runat="server" ID="MatchRepeater">
                    <ItemTemplate>
                        <tr>
                            <td style="width:35%">
                                <a href='<%# "/ffl/anonymous/club.aspx?Id=" + DataBinder.Eval(Container.DataItem, "HomeClubId")  %>'>
                                    <%#DataBinder.Eval(Container.DataItem, "HomeClubName") %>
                                </a>
                                
                            </td>
                            <td align="center" style="width:30%"><%#DataBinder.Eval(Container.DataItem, "HomeClubGoals") + "-" + DataBinder.Eval(Container.DataItem, "AwayClubGoals") %></td>
                            <td style="width:35%">
                                <a href='<%# "/ffl/anonymous/club.aspx?Id=" + DataBinder.Eval(Container.DataItem, "AwayClubId")  %>'>
                                    <%#DataBinder.Eval(Container.DataItem, "AwayClubName") %>
                                </a>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <tr>
                            <td class="alternatetablerow" style="width:35%">
                                <a href='<%# "/ffl/anonymous/club.aspx?Id=" + DataBinder.Eval(Container.DataItem, "HomeClubId")  %>'>
                                    <%#DataBinder.Eval(Container.DataItem, "HomeClubName") %>
                                </a>
                            </td>
                            <td class="alternatetablerow" align="center" style="width:30%"><%#DataBinder.Eval(Container.DataItem, "HomeClubGoals") + "-" + DataBinder.Eval(Container.DataItem, "AwayClubGoals") %></td>
                            <td class="alternatetablerow" style="width:35%">
                                <a href='<%# "/ffl/anonymous/club.aspx?Id=" + DataBinder.Eval(Container.DataItem, "AwayClubId")  %>'>
                                    <%#DataBinder.Eval(Container.DataItem, "AwayClubName") %>
                                </a>
                            </td>
                        </tr>
                    </AlternatingItemTemplate>
                </asp:Repeater>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </form>
</asp:Content>

